package collection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

public class ToArray1 {
    public static void main(String[] args) {
        Collection<String> c = new ArrayList<>();
        c.add("这");
        c.add("个");
        c.add("也");
        c.add("行");

        String[] arr = c.toArray(new String[c.size()]);
        System.out.println(Arrays.toString(arr));


        String[] array ={"数组","转","集合"};
        List<String> l = Arrays.asList(array);
        System.out.println(l);
    }
}
